package com.yswy.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("周期扣款签约记录")
@TableName(value = "agreemen_order_pay_log")
public class AgreementOrderPayLog{
    @TableId(type = IdType.AUTO)
    private Long logId;
    private Long agreementOrderId ;
    @ApiModelProperty("订单号")
    private Long payOrderId;
    @ApiModelProperty("收款状态  -1 等待 0 付款中等待回调  1 成功  2 失败  3 解约 4 扣款成功无需继续扣款  5 支付异常")
    private Integer statusType = -1;
    @ApiModelProperty("扣款周期 ")
    private Integer payments;
    @ApiModelProperty("扣款金额付款价格(分)")
    private Integer agreemenPrice;
    @ApiModelProperty("添加会员时间")
    private Long agreemenTime;
    @ApiModelProperty("添加会员时间 0 小时 1 天 2 月 3 年")
    private String agreemenTimeType;
    @ApiModelProperty("扣款日期")
    private Date timeDate;
    @ApiModelProperty("失败原因")
    private String subMsg;
    public AgreementOrderPayLog(Long agreementOrderId, Integer payments, Date timeDate) {
        this.agreementOrderId = agreementOrderId;
        this.statusType = -1;
        this.payments = payments;
        this.timeDate = timeDate;
    }



}
